import 'package:fish_redux/fish_redux.dart';
import 'package:flutter/material.dart';
import '../MainView/model/main_view_model.dart';

class EngineerOrderViewState implements Cloneable<EngineerOrderViewState> {
  FixListItemModel model;

  /// 1  未接单  3 准备入户维修  4 正在维修中  5 完成维修
  String step;
  ScrollController scrollController = ScrollController();

  TextEditingController contentController = TextEditingController();
  List imageList = [];

  TextEditingController contentBeforeController = TextEditingController();
  List imageBeforeList = [];

  var signPhoto;
  List orderPhoto = [];

  @override
  EngineerOrderViewState clone() {
    return EngineerOrderViewState()
      ..model = model
      ..contentController = contentController
      ..contentBeforeController = contentBeforeController
      ..imageBeforeList = imageBeforeList
      ..scrollController = scrollController
      ..imageList = imageList
      ..signPhoto = signPhoto
      ..orderPhoto = orderPhoto
      ..step = step;
  }
}

EngineerOrderViewState initState(Map<String, dynamic> args) {
  EngineerOrderViewState state = EngineerOrderViewState()
    ..model = args['model'];
  state.step = state.model.status;
  return state;
}
